package com.im323.quartz;

import java.util.ArrayList;
import java.util.List;

/**
 * 任务详情
 * 
 * @description
 * @projectName imDnsPodClientForJava
 * @author 王璞
 * @date 2017年10月24日下午5:28:30
 */
public class UpdateRecordModel {

	private static List<UpdateRecordModel> jobList = new ArrayList<>();

	public static void addJobInfo(UpdateRecordModel updateRecordModel) {
		if (updateRecordModel.getDomainId() == null) {
			return;
		}
		for (int i = 0; i < jobList.size(); i++) {
			if (jobList.get(i).getDomainId().compareTo(updateRecordModel.getDomainId()) == 0) {
				jobList.remove(i);
				break;
			}
		}
		jobList.add(updateRecordModel);
	}

	public static List<UpdateRecordModel> getJobList() {
		return jobList;
	}

	private Integer domainId;
	private Integer recordId;
	private String subDomain;
	private String recordLineId;
	private String value;

	public Integer getDomainId() {
		return domainId;
	}

	public void setDomainId(Integer domainId) {
		this.domainId = domainId;
	}

	public Integer getRecordId() {
		return recordId;
	}

	public void setRecordId(Integer recordId) {
		this.recordId = recordId;
	}

	public String getSubDomain() {
		return subDomain;
	}

	public void setSubDomain(String subDomain) {
		this.subDomain = subDomain;
	}

	public String getRecordLineId() {
		return recordLineId;
	}

	public void setRecordLineId(String recordLineId) {
		this.recordLineId = recordLineId;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return "UpdateRecordModel [domainId=" + domainId + ", recordId=" + recordId + ", subDomain=" + subDomain
				+ ", recordLineId=" + recordLineId + ", value=" + value + "]";
	}

}
